<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ExitApp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>ExitApp</h1>

<p>Terminates the script unconditionally.</p>

<pre class="Syntax">ExitApp [, ExitCode]</pre>
<h3>Parameters</h3>
<dl>

  <dt>ExitCode</dt>
  <dd><p>An integer between -2147483648 and 2147483647 (can be an <a href="../Variables.htm#Expressions">expression</a> in v1.0.48.01+) that is returned to its caller when the script exits. This code is accessible to any program that spawned the script, such as another script (via RunWait) or a batch (.bat) file. If omitted, <em>ExitCode</em> defaults to zero. Zero is traditionally used to indicate success.</dd>

</dl>

<h3>Remarks</h3>
<p>The script is immediately terminated unless it has an <a href="OnExit.htm">OnExit</a> subroutine. This is equivalent to choosing &quot;Exit&quot; from the script's tray menu or main menu.</p>
<p><a href="Exit.htm">Exit</a> and ExitApp behave identically when the script contains no hotkeys, is not <a href="_Persistent.htm">persistent</a>, and does not ask for the Num/Scroll/Capslock key(s) to be kept AlwaysOn or AlwaysOff.</p>
<p>If the script has an <a href="OnExit.htm">OnExit</a> subroutine, it will be run in response to ExitApp.</p>
<h3>Related</h3>
<p><a href="Exit.htm">Exit</a>, <a href="OnExit.htm">OnExit</a>, <a href="_Persistent.htm">#Persistent</a></p>
<h3>Example</h3>
<pre class="NoIndent">#x::ExitApp  <em>; Assign a hotkey to terminate this script.</em></pre>

</body>
</html>
